package com.sgb.kjwl.di.shopping;

import com.sgb.kjwl.repository.ShopCompanyInfoRepertory;
import com.sgb.kjwl.repository.impl.ShopCompanyInfoRepertoryImpl;
import com.sgb.kjwl.view.ui.activity.self.shop.CompanyShopInfoActivity;
import com.sgb.kjwl.view.ui.activity.self.shop.ShopCompanyInfoActivity;
import com.sgb.kjwl.view.ui.activity.self.shop.ShopPriceDetailsAct;
import com.sgb.kjwl.viewmodel.shopping.ShopCompanyModel;
import com.sgb.kjwl.viewmodel.shopping.ShopConmpanyInfoModel;
import com.sgb.kjwl.viewmodel.shopping.ShopPriceDetailsModel;
import com.swgk.core.base.api.BaseApiSource;
import com.swgk.core.base.di.Activity;
import com.swgk.core.base.model.preference.BasePreferenceSource;

import dagger.Module;
import dagger.Provides;

@Module
public class ShopModule {
    private CompanyShopInfoActivity companyShopInfoActivity;
    private ShopCompanyInfoActivity shopCompanyInfoActivity;
    private ShopPriceDetailsAct shoppricedetailsact;

    public ShopModule(CompanyShopInfoActivity companyShopInfoActivity) {
        this.companyShopInfoActivity = companyShopInfoActivity;
    }

    public ShopModule(ShopCompanyInfoActivity shopCompanyInfoActivity) {
        this.shopCompanyInfoActivity = shopCompanyInfoActivity;
    }
    public ShopModule(ShopPriceDetailsAct shoppricedetailsact) {
        this.shoppricedetailsact = shoppricedetailsact;
    }

    @Activity
    @Provides
    ShopCompanyInfoRepertory provideShopRepertory(BaseApiSource apiSource, BasePreferenceSource preferenceSource) {
        return new ShopCompanyInfoRepertoryImpl(apiSource, preferenceSource);
    }


    @Activity
    @Provides
    ShopConmpanyInfoModel provideShopAddresseModel(ShopCompanyInfoRepertory repertory) {
        return new ShopConmpanyInfoModel(companyShopInfoActivity, repertory);
    }

    @Activity
    @Provides
    ShopCompanyModel ShopCompanyInfoModle(ShopCompanyInfoRepertory repertory) {
        return new ShopCompanyModel(shopCompanyInfoActivity, repertory);
    }
    @Activity
    @Provides
    ShopPriceDetailsModel ShopPriceDetailsinfoModel(ShopCompanyInfoRepertory repertory) {
        return new ShopPriceDetailsModel(shoppricedetailsact, repertory);
    }

}
